package com.chuangjiangx.member.score.ddd.dal.dto;

import lombok.Getter;

import java.util.Date;

/**
 * 积分明细
 */
@Getter
public class ScoreStreamList {

    /**
     * id
     */
    private Long id;

    /**
     * 会员id
     */
    private Long memberId;

    /**
     * 会员卡号
     */
    private String memberCardNum;

    /**
     * 积分类型
     */
    private Byte type;

    /**
     * 交易积分
     */
    private Long score;

    /**
     * 可用积分
     */
    private Long availableScore;


    /**
     * 终端类型
     */
    private Byte registerTerminalType;

    /**
     * 终端编号
     */
    private String registerTerminalNum;

    /**
     * 交易时间
     */
    private Date createTime;

    /**
     * 备注
     */
    private String remark;


    /**
     * 会员名字
     */
    private String name;

    /**
     * 会员手机号
     */
    private String mobile;


    /**
     * 累计积分
     */
    private Long totalScore;

    /**
     * 已兑换积分累计
     */
    private Long totalConsumeScore;

    /**
     * 商户名称
     */
    private String merchantName;

    public void setId(Long id) {
        this.id = id;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public void setMemberCardNum(String memberCardNum) {
        this.memberCardNum = memberCardNum;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public void setScore(Long score) {
        this.score = score;
    }

    public void setAvailableScore(Long availableScore) {
        this.availableScore = availableScore;
    }

    public void setRegisterTerminalType(Byte registerTerminalType) {
        this.registerTerminalType = registerTerminalType;
    }

    public void setRegisterTerminalNum(String registerTerminalNum) {
        this.registerTerminalNum = registerTerminalNum;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }


    public void setTotalScore(Long totalScore) {
        this.totalScore = totalScore;
    }

    /**
     * 已兑换积分
     */
    public void setTotalConsumeScore(Long totalConsumeScore) {
        totalConsumeScore = totalScore - availableScore;
        this.totalConsumeScore = totalConsumeScore;
    }


    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

}
